package cn.iocoder.yudao.module.trade.controller.app.order.vo;

import cn.iocoder.yudao.framework.common.enums.trade.TransactionTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Schema(description = "用户 App - 订单交易的明细 Response VO")
@Data
public class AppTradeOrderDetailRespVO {

    // ========== 订单基本信息 ==========

    @Schema(description = "订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1146347329394184195")
    private String orderNo;

    private Integer metalType;

    @Schema(description = "下单时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime createTime;

    @Schema(description = "用户备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
    private String remark;

    @Schema(description = "订单状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer status;
    private Boolean isStore;

    @Schema(description = "克重", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
    private BigDecimal weight;

    private BigDecimal exchangeWeight;
    private BigDecimal convertWeight;

    private BigDecimal orderPrice;
    private BigDecimal settlePrice;
    private BigDecimal deductPrice;

    @Schema(description = "结算时间")
    private LocalDateTime settleTime;

    @Schema(description = "订单取消时间")
    private LocalDateTime cancelTime;

    // ========== 价格 + 支付基本信息 ==========


    @Schema(description = "支付订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    private Long payOrderId;

    @Schema(description = "付款时间")
    private LocalDateTime payTime;

    @Schema(description = "付款超时时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime payExpireTime;

    @Schema(description = "支付渠道", example = "wx_lite_pay")
    private String payChannelCode;
    @Schema(description = "支付渠道名", example = "微信小程序支付")
    private String payChannelName;

    @Schema(description = "商品原价（总）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
    private BigDecimal totalPrice;

    @Schema(description = "订单优惠（总）", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    private BigDecimal discountPrice;

    @Schema(description = "运费金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    private Integer deliveryPrice;

    private BigDecimal metalPrice;

    private Integer payStatus;

    // ========== 收件 + 物流基本信息 ==========

    @Schema(description = "配送方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer deliveryType;

    private TradeOrderDeliveryRespVO memberAddr;

    private TradeOrderDeliveryRespVO shopAddr;

    @Schema(description = "自提门店编号", example = "1088")
    private Long pickUpStoreId;

    @Schema(description = "自提核销码", example = "40964096")
    private String pickUpVerifyCode;

    // ========== 售后基本信息 ==========

    @Schema(description = "售后状态", example = "0")
    private Integer refundStatus;

    @Schema(description = "退款金额，单位：分", example = "100")
    private Integer refundPrice;

    /**
     * 订单类型
     * 枚举 {@link TransactionTypeEnum}
     */
    private Integer orderType;

    /**
     * 用户编号
     */
    private Long userId;
    /**
     * 用户备注
     */
    private String userRemark;

    /**
     * 结算方式
     */
    private Integer settleMethod;

    /**
     * 旧料成色
     */
    private BigDecimal purity;

    /**
     * 定金金额
     */
    private BigDecimal depositPrice;

    /**
     * 所获积分
     */
    private Integer point;


    private BigDecimal settlePriceTotal;

    /**
     * 定金金额
     */
    private BigDecimal receivePrice;
    private BigDecimal receiveDeposit;
    private BigDecimal receiveDepositAdd;
    private BigDecimal receiveDelayFee;
    private BigDecimal receiveProcessFee;
    private BigDecimal receiveAdditionalFee;

    /**
     * 定金参数/g
     */
    private BigDecimal depositPriceConf;
    /**
     * 免息天数
     */
    private Integer interestFreeDays;
    /**
     * 延期费用（参数）
     */
    private BigDecimal delayFeeConf;
    /**
     * 工费参数
     */
    private BigDecimal processConf;

}
